package service;



import dao.LoginDao;
import entity.User;



public class LoginService {
	
	
	
	public boolean login(String username, String password){
		LoginDao loginDao = new LoginDao();
		User user = loginDao.getUserByName(username);
		if (user==null) {	                    
			return false;
		}
		if (!user.getPassword().equals(password)) {		
			return false;
		}
		return true;
	}
}
